<?PHP
// vim: set expandtab tabstop=4 shiftwidth=4:
// +----------------------------------------------------------------------+
// | Communicator for the SAPID CMS                               		  |
// +----------------------------------------------------------------------+
// | Author:  Dmitry Sheiko (www.cmsdevelopment.com)	                  |
// | Copyright (c) 2004 Dmitry Sheiko	                                  |
// | http://sapid.sourceforge.net	                                      |
// +----------------------------------------------------------------------+
// | This source file is free software; you can redistribute it and/or    |
// | modify it under the terms of the GNU Lesser General Public           |
// | License as published by the Free Software Foundation; either         |
// | version 2.1 of the License, or (at your option) any later version.   |
// |                                                                      |
// | This source file is distributed in the hope that it will be useful,  |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of       |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU    |
// | Lesser General Public License for more details.                      |
// +----------------------------------------------------------------------+
// Release: 18.11.04 (dd/mm/yy)
// $Id: registration_form.inc.php,v 1.1.1.1 2005/06/13 07:20:29 mephius Exp $

	if($common["ID_OF_USER"]) {
		$info = @join("", @file($server_path."getuserinfo.php?id_of_user=".$common["ID_OF_USER"]));
		$common["NAME_OF_USER"] = preg_replace("/^.*?<name_of_user>(.*?)<\/name_of_user>.*?$/is", "\\1", $info);
		$common["DESCRIPTION_OF_USER"] = preg_replace("/^.*?<description_of_user>(.*?)<\/description_of_user>.*?$/is", "\\1", $info);
		$common["ICON_OF_USER"] = preg_replace("/^.*?<icon_of_user>(.*?)<\/icon_of_user>.*?$/is", "\\1", $info);
		$common["ICON_OF_USER"] = trim($common["ICON_OF_USER"]);
	}


	echo('
		<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
		
		<html>
		<head>
			<title>'.$lang["RegistrationOfCommunicator"].'</title>
		<link rel="stylesheet" type="text/css" href="'.$http_path.'usr/system/default.css" />
		</head>
		
	<body marginwidth="0" marginheight="0" style="margin:0px">		
	<table class="tpanel" height="100%" style="width: 100%;" cellspacing="0" cellpadding="0" border="0">
		<tr>
			<td class="header" style="text-align: center;">
				<b>'.$lang["RegistrationOfCommunicator"].'</b>
			</td>
		</tr>
		<tr height="100%">
			<td height="100%" style="padding: 20px; font-family: Verdana, Arial; text-align: center">

<form action="'.$server_path.'register.php" method="post" enctype="multipart/form-data">
	
	<input type="HIDDEN" name="row[id]" value="'.$common["ID_OF_USER"].'" />
	<input type="HIDDEN" name="row[icon]" value="'.$common["ICON_OF_USER"].'" />
	<input type="HIDDEN" name="row[http_path]" value="'.$http_path.'" />
	<input type="HIDDEN" name="row[redirect]" value="'.$http_path.'usr/system/communicator/index.php" />
	
<table cellpadding="0" cellspacing="0" border="0" style="padding:5px 10px 5px 10px; font-size: 12px"> 
	<tr>
		<td valign="top" nowrap="nowrap">
			'.$lang["YourName"].': 
		</td>
		<td>
			<input type="TEXT" style="width: 300px" name="row[name]" value="'.$common["NAME_OF_USER"].'" />
		</td>
	</tr>
	
	<tr>
		<td valign="top" nowrap="nowrap">
			'.$lang["YourIcon"].': 
		</td>
		<td>
			<input type="FILE" style="width: 300px" name="icon" value="" />
			'.($common["ICON_OF_USER"] ? '<br />
			<img src="'.$server_path.'images/'.$common["ICON_OF_USER"].'" width="62" height="62" alt="" style="border: solid 2px white; margin: 5px 5px 5px 5px" border="0" />
			<br /><input type="checkbox" value="1" name="icon_delete" /> '.$lang["ChangeImage"]:'').'	
		</td>
	</tr>
	<tr>
		<td valign="top" nowrap="nowrap">
			'.$lang["YourDescription"].': 
		</td>
		<td>
			<textarea style="width: 300px" name="row[description]">'.$common["DESCRIPTION_OF_USER"].'</textarea>
	
		</td>
	</tr>
</table>	
	<br /><div align="center"><input type="submit" name="sbm" value="'.$lang["LetRegistrate"].'" class="sapidcms_cont_btn" /> </div>
	
	</form>
	
			</td>
		</tr>
		<tr>
			<td class="header" align="right">&nbsp;</td>
		</tr>
	</table>
	</body>
	</html>

	
');	
?>